<template>
     <!--  内容-->
    <div class="order_content">
      <div class="container-fluid">
        <order-guide></order-guide>
        <form role="form" id="form_order">
          <order-bill :receiveName='receiveData'></order-bill>
          <order-benefits></order-benefits>
          <order-studentinfo></order-studentinfo>
          <order-payerinfo></order-payerinfo>
          <order-submit @SureClick='SureClick'></order-submit>
        </form>
      </div>
      <!-- 模态框 -->
      <order-agree></order-agree>
      <order-points></order-points>
      <order-confirm></order-confirm>
      <order-reference></order-reference>
    </div>
</template>
<script>
import axios from "axios";
import OrderGuide from './Guide'
import OrderBill from './OrderBill'
import OrderBenefits from './OrderBenefits'
import OrderStudentinfo from './OrderStudentinfo'
import OrderPayerinfo from './OrderPayerinfo'
import OrderSubmit from './OrderSubmit'
import OrderAgree from './OrderAgree'
import OrderPoints from './OrderPoints'
import OrderConfirm from './OrderConfirm'
import OrderReference from './OrderReference'
export default {
  name: "Content",
  props: {
    code: String
  },
  components: {
    OrderGuide,
    OrderBill,
    OrderBenefits,
    OrderStudentinfo,
    OrderPayerinfo,
    OrderSubmit,
    OrderAgree,
    OrderPoints,
    OrderConfirm,
    OrderReference
  },
  data () {
    return {
      receiveData:{},
      college_code:'',
      show: false
    }
  },
  methods: {
    HandleReceive () {
      axios.get("/static/json/receive_name.json", {
        params: { college_code: this.college_code }
      })
        .then(this.getReveiveInfo)
    },
    getReveiveInfo (res) {
     res = res.data
     if (res.status == 0 && res.data){
       this.receiveData =res.data 
     }
    },
    SureClick () {
       $('.modal-order-confirm').modal('show')
    }
  },
  watch: {
    college_code () {
      this.HandleReceive()
    }
  },
  mounted () {
     if(this.$route.query.college_code){
      this.college_code = this.$route.query.college_code
    }
  }
};
</script>

<style>
</style>
